﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="RoleManagement.aspx.cs" Inherits="HCFramework.User.Role.RoleManagement" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="groupHeader">
        Role management
    </div>
    <asp:Panel ID="PanelGrid" runat="server">
        <telerik:RadGrid ID="RadGridMain" runat="server" Skin="Office2007" 
            AutoGenerateColumns="False" 
            onitemcommand="RadGridMain_ItemCommand" 
            onprerender="RadGridMain_PreRender" AllowFilteringByColumn="True" 
            AllowPaging="True" AllowSorting="True" GridLines="None">
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Thêm mới" NoMasterRecordsText="Chưa có bản ghi nào.">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <CommandItemSettings AddNewRecordText="Thêm mới" />
                <Columns>
                    <telerik:GridBoundColumn DataField="RoleID" UniqueName="RoleID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn CommandName="Sua" DataTextField="Sua"
                        UniqueName="Sua">
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn CommandName="Xoa" DataTextField="Xoa"
                        UniqueName="Xoa" ConfirmText="Are you sure to delete this record?">
                    </telerik:GridButtonColumn>
                </Columns>
                <CommandItemTemplate>
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Image/add.gif" />
                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Them" AccessKey="n" TabIndex="1">Insert</asp:LinkButton>
                </CommandItemTemplate>
            </MasterTableView>
        </telerik:RadGrid>
    </asp:Panel>
    <asp:Panel ID="PanelAddAndEdit" runat="server">
        <table>
            <tr>
                <td style="font-weight: bold">
                    Name:
                </td>
                <td>
                    <asp:TextBox ID="TextBoxName" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="TextBoxName" ErrorMessage="Name is required!"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    
                </td>
                <td>
                    <asp:Button ID="ButtonAdd" runat="server" Text="Insert" 
                        onclick="ButtonAdd_Click" />
                    <asp:Button ID="ButtonUpdate" runat="server" Text="Update" 
                        onclick="ButtonUpdate_Click" />
                    <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" 
                        onclick="ButtonCancel_Click" CausesValidation="False" />
                </td>
                <td></td>
            </tr>
        </table>
    </asp:Panel>
    
    <asp:Label ID="LabelID" runat="server" Text="" Visible="False"></asp:Label>
</asp:Content>
